<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>自定义标签框样式 - jQuery EasyUI 演示</title>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
	<h2 title="Custom TagBox Style">自定义标签框样式</h2>
	<p title="This example shows how to apply different CSS styles to different tags.">　　本例展示如何给不同的标签分别匹配不同的 CSS 样式（如：Java 粉底红字粗体，此外其他各值项均为深灰底淡银色）。</p>
	<div class="easyui-panel" style="width:100%;max-width:400px;padding:10px 20px 20px 20px;">
		<input class="easyui-tagbox" label="<h title='Add a tag'>添加标签：</h>" style="width:100%" data-options="
				url: 'tagbox_data1.json',
				method: 'get',
				value: '1,12',
				valueField: 'id',
				textField: 'text',
				limitToList: true,
				prompt: '输选一语言…',
				tagStyler: function(value){
					if (value == 1){
						return 'background:#ffd7d7;color:#c65353;font-weight:bold;';
					} else if (value == 10){
						return 'background:#b8eecf;color:#45872c';
					}
				}
				">
	</div>
</body>
</html>